using System;
using System.Windows.Automation.Peers;
using System.Windows.Controls;

namespace Magellan.Controls
{
    /// <summary>
    /// Automation Peer for the UITextBlock control
    /// </summary>
    public class UITextBlockAutomationPeer : TextBlockAutomationPeer
    {
        /// <summary>
        /// Ctor for UITextBlockAutomationPeer
        /// </summary>
        /// <param name="owner"></param>
        public UITextBlockAutomationPeer(TextBlock owner)
            : base(owner)
        {
        }

        /// <summary>
        /// Gets or sets a value that indicates whether the <see cref="T:System.Windows.Controls.TextBlock"/> that is associated with this <see cref="T:System.Windows.Automation.Peers.TextBlockAutomationPeer"/> is something that the end user would understand as being interactive or as contributing to the logical structure of the control in the GUI. Called by <see cref="M:System.Windows.Automation.Peers.AutomationPeer.IsControlElement"/>.
        /// </summary>
        /// <returns>
        /// false if the element is part of a template; otherwise true.
        /// </returns>
        protected override bool IsControlElementCore()
        {
            return true;
        }
    }
}